package com.maozzi.common.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 分页参数
 *
 * @author maozi
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageParam implements Serializable {
    private final static Integer MAX_PAGE_SIZE = 200;

    private Integer page;
    private Integer pageSize;

    public Integer getPageSize() {
        return pageSize > MAX_PAGE_SIZE ? MAX_PAGE_SIZE : pageSize;
    }
}
